import org.example.Student;
import org.example.User;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.ClassPathResource;

public class App {
    public static void main(String[] args) {
        //1,获得Spring对象上下文
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
        //2,获取指定的Bean对象
        User user = (User) context.getBean("user");
        //3,使用Bean对象(非必须）
    }
}
